In [1]:
    
!date #last update
    
    
Required:
In [ ]:
    
import os.path, gitpath #pip install git+'https://github.com/ruxi/python-gitpath.git'
os.chdir(gitpath.root()) # changes path to .git root
#os.getcwd() #check current work directory
    
by Ruxi
Feb 8, 2016
What is Jekyll? Its a static templating library enables blogging on github pages
It follows this directory structure
In [4]:
    
from IPython.display import IFrame
url = 'http://jekyllrb.com/docs/structure/'
IFrame(url, width=300, height=400)
    
    Out[4]:
sudo apt-get install ruby ruby-dev make gcc nodejs
In [55]:
    
# write files to .gitignore if not exist
with open('.gitignore', 'r+') as f:
    ignorelist = ['_sites']
    for path in ignorelist:
        if path in f.read():
            print('Found:\t"{}"\tmoving to next'.format(path))
        else:
            print('Not found:\t"{}"\twriting to file'.format(path))
            f.writelines("{}\n".format(path))
    
    
In [60]:
    
!cat .gitignore
    
    
In [ ]:
    
%%writefile _config.yml
name: Ruxi
markdown:
    
In [ ]:
    
Apprently karmdown is the only flavor of
    
Saving
In [57]:
    
py_commit_msg = """
write code cell to add file to .gitignore if not found
"""
    
In [58]:
    
%%bash -s "$py_commit_msg"
echo $1
git add --all :/
git commit -a -m "$1" #message from py_commit_msg
git push origin master
    
    
    
Pulling
git fetch --all
git pull origin master
In [ ]: